package com.dhecp.project.system.controller;

import com.dhecp.project.system.service.SysCommonService;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.util.WebUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import com.dhecp.common.config.Global;
import com.dhecp.common.core.controller.BaseController;
import com.dhecp.framework.util.ShiroUtils;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;

/**
 * 首页 业务处理
 * 
 * @author ruoyi
 */
@Controller
public class SysIndexController extends BaseController
{

    @Autowired
    private SysCommonService sysCommonService;


    // 系统首页
    @GetMapping("/index")
    public String index(ModelMap mmap, ServletRequest request, ServletResponse response) throws IOException {
    	//从配置文件中取配置信息
        mmap.put("projectName", Global.getName());
        mmap.put("copyrightYear", Global.getCopyrightYear());
        mmap.put("version", "V" + Global.getVersion());
        return "index";
    }

    // 系统介绍
    @GetMapping("/system/main")
    public String main(ModelMap mmap)
    {
        mmap.put("version", Global.getVersion());
        return "main";
    }
}
